<!DOCTYPE HTML>
<html lang="en" >
    
    <head>
        
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <title>伪类E:checked选择器 | </title>
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <meta name="description" content="">
        <meta name="generator" content="GitBook 2.6.7">
        
        
        <meta name="HandheldFriendly" content="true"/>
        <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
        <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
        <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">
        
    <link rel="stylesheet" href="../gitbook/style.css">
    
        
        <link rel="stylesheet" href="../gitbook/plugins/gitbook-plugin-highlight/website.css">
        
    
        
        <link rel="stylesheet" href="../gitbook/plugins/gitbook-plugin-search/search.css">
        
    
        
        <link rel="stylesheet" href="../gitbook/plugins/gitbook-plugin-fontsettings/website.css">
        
    
    

        
    
    
    <link rel="next" href="../CSSd/css.12.html" />
    
    
    <link rel="prev" href="../CSSd/css.10.html" />
    

        
    </head>
    <body>
        
        
    <div class="book"
        data-level="3.10"
        data-chapter-title="伪类E:checked选择器"
        data-filepath="CSSd/css.11.md"
        data-basepath=".."
        data-revision="Wed Jul 26 2017 09:43:57 GMT+0800 (中国标准时间)"
        data-innerlanguage="">
    

<div class="book-summary">
    <nav role="navigation">
        <ul class="summary">
            
            
            
            

            

            
    
        <li class="chapter " data-level="0" data-path="index.html">
            
                
                    <a href="../index.html">
                
                        <i class="fa fa-check"></i>
                        
                        Introduction
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1" data-path="HTML/html.html">
            
                
                    <a href="../HTML/html.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.</b>
                        
                        HTML第一节课
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.1" data-path="HTML/html1.1.html">
            
                
                    <a href="../HTML/html1.1.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.1.</b>
                        
                        什么叫html
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="HTML/html1.2.html">
            
                
                    <a href="../HTML/html1.2.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.2.</b>
                        
                        html语法
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="HTML/html1.3.html">
            
                
                    <a href="../HTML/html1.3.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.3.</b>
                        
                        常用的标签
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="HTML/html1.4.html">
            
                
                    <a href="../HTML/html1.4.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.4.</b>
                        
                        块级元素和行内元素
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="HTML/html1.5.html">
            
                
                    <a href="../HTML/html1.5.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.5.</b>
                        
                        a链接的使用
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.6" data-path="HTML/html1.6.html">
            
                
                    <a href="../HTML/html1.6.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.6.</b>
                        
                        其它特殊应用
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.7" data-path="HTML/html1.7.html">
            
                
                    <a href="../HTML/html1.7.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.7.</b>
                        
                        锚点的使用
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.8" data-path="HTML/html1.8.html">
            
                
                    <a href="../HTML/html1.8.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.8.</b>
                        
                        音频标签和使用
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.9" data-path="HTML/html1.9.html">
            
                
                    <a href="../HTML/html1.9.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.9.</b>
                        
                        ideo视频标签和使用
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.10" data-path="HTML/html1.10.html">
            
                
                    <a href="../HTML/html1.10.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.10.</b>
                        
                        实体字符
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.11" data-path="HTML/html11.html">
            
                
                    <a href="../HTML/html11.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.11.</b>
                        
                        文本格式化
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2" data-path="HTML/20170720HTML.html">
            
                
                    <a href="../HTML/20170720HTML.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.</b>
                        
                        HTML第二节课
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.1" data-path="HTML/html1.html">
            
                
                    <a href="../HTML/html1.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.</b>
                        
                        form表单
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.2" data-path="HTML/html2.html">
            
                
                    <a href="../HTML/html2.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.2.</b>
                        
                        input(表单元素：输入框)
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.3" data-path="HTML/html3.html">
            
                
                    <a href="../HTML/html3.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.3.</b>
                        
                        method
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.4" data-path="HTML/html5.html">
            
                
                    <a href="../HTML/html5.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.4.</b>
                        
                        lable
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.5" data-path="HTML/html4.html">
            
                
                    <a href="../HTML/html4.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.5.</b>
                        
                        select(表单元素：下拉框)
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.6" data-path="HTML/html6.html">
            
                
                    <a href="../HTML/html6.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.6.</b>
                        
                        块级元素
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.7" data-path="HTML/html7.html">
            
                
                    <a href="../HTML/html7.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.7.</b>
                        
                        行内元素
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="3" data-path="CSSd/css.1.html">
            
                
                    <a href="../CSSd/css.1.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.</b>
                        
                        CSS第一节课
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="3.1" data-path="CSSd/css.2.html">
            
                
                    <a href="../CSSd/css.2.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.1.</b>
                        
                        如何引入CSS
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.2" data-path="CSSd/css.3.html">
            
                
                    <a href="../CSSd/css.3.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.2.</b>
                        
                        页内引入
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.3" data-path="CSSd/css.4.html">
            
                
                    <a href="../CSSd/css.4.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.3.</b>
                        
                        页外引入
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.4" data-path="CSSd/css.5.html">
            
                
                    <a href="../CSSd/css.5.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.4.</b>
                        
                        通配选择器
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.5" data-path="CSSd/css.6.html">
            
                
                    <a href="../CSSd/css.6.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.5.</b>
                        
                        元素选择符
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.6" data-path="CSSd/css7.html">
            
                
                    <a href="../CSSd/css7.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.6.</b>
                        
                        群组选择符
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.7" data-path="CSSd/css.8.html">
            
                
                    <a href="../CSSd/css.8.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.7.</b>
                        
                        关系选择符
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.8" data-path="CSSd/css.9.html">
            
                
                    <a href="../CSSd/css.9.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.8.</b>
                        
                        id 及 class 选择符
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.9" data-path="CSSd/css.10.html">
            
                
                    <a href="../CSSd/css.10.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.9.</b>
                        
                        伪类选择器
                    </a>
            
            
        </li>
    
        <li class="chapter active" data-level="3.10" data-path="CSSd/css.11.html">
            
                
                    <a href="../CSSd/css.11.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.10.</b>
                        
                        伪类E:checked选择器
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.11" data-path="CSSd/css.12.html">
            
                
                    <a href="../CSSd/css.12.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.11.</b>
                        
                        属性选择器
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.12" data-path="CSSd/css.13.html">
            
                
                    <a href="../CSSd/css.13.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.12.</b>
                        
                        伪对象选择器
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="4" data-path="stylecss/20170725/stlecss1.html">
            
                
                    <a href="../stylecss/20170725/stlecss1.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.</b>
                        
                        CSS第二节课
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="4.1" data-path="stylecss/20170725/1.html">
            
                
                    <a href="../stylecss/20170725/1.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.1.</b>
                        
                        字体名称:font-family
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.2" data-path="stylecss/20170725/2.html">
            
                
                    <a href="../stylecss/20170725/2.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.2.</b>
                        
                        字体大小:font-size
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.3" data-path="stylecss/20170725/3.html">
            
                
                    <a href="../stylecss/20170725/3.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.3.</b>
                        
                        字体加粗:font-weight
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.4" data-path="stylecss/20170725/4.html">
            
                
                    <a href="../stylecss/20170725/4.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.4.</b>
                        
                        字体斜体:font-style
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.5" data-path="stylecss/20170725/5.html">
            
                
                    <a href="../stylecss/20170725/5.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.5.</b>
                        
                        行高:link-height
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.6" data-path="stylecss/20170725/6.html">
            
                
                    <a href="../stylecss/20170725/6.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.6.</b>
                        
                        字体样式简写
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.7" data-path="stylecss/20170725/7.html">
            
                
                    <a href="../stylecss/20170725/7.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.7.</b>
                        
                        透明度:rgba和色相hsl
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.8" data-path="stylecss/20170725/8.html">
            
                
                    <a href="../stylecss/20170725/8.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.8.</b>
                        
                        文本装饰线条:text-decoration
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.9" data-path="stylecss/20170725/9.html">
            
                
                    <a href="../stylecss/20170725/9.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.9.</b>
                        
                        文字阴影:text-shadow
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.10" data-path="stylecss/20170725/10.html">
            
                
                    <a href="../stylecss/20170725/10.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.10.</b>
                        
                        嵌入字体:font-face
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.11" data-path="stylecss/20170725/11.html">
            
                
                    <a href="../stylecss/20170725/11.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.11.</b>
                        
                        使用外部icon图标库
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    


            
            <li class="divider"></li>
            <li>
                <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
                    Published with GitBook
                </a>
            </li>
            
        </ul>
    </nav>
</div>

    <div class="book-body">
        <div class="body-inner">
            <div class="book-header" role="navigation">
    <!-- Actions Left -->
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="../" ></a>
    </h1>
</div>

            <div class="page-wrapper" tabindex="-1" role="main">
                <div class="page-inner">
                
                
                    <section class="normal" id="section-">
                    
                        <h2 id="&#x4F2A;&#x7C7B;echecked&#x9009;&#x62E9;&#x5668;">&#x4F2A;&#x7C7B;E:checked&#x9009;&#x62E9;&#x5668;</h2>
<p>&#x5339;&#x914D;&#x7528;&#x6237;&#x754C;&#x9762;&#x4E0A;&#x5904;&#x4E8E;&#x9009;&#x4E2D;&#x72B6;&#x6001;&#x7684;&#x5143;&#x7D20;E&#x3002;(&#x7528;&#x4E8E;input type&#x4E3A;radio&#x4E0E;checkbox&#x65F6;)</p>
<pre><code class="lang-css">&lt;!DOCTYPE html&gt;
&lt;html lang=&quot;zh-cmn-Hans&quot;&gt;
&lt;head&gt;
&lt;meta charset=&quot;utf-8&quot; /&gt;
&lt;title&gt;&#x7528;&#x6237;&#x754C;&#x9762;(UI)&#x5143;&#x7D20;&#x72B6;&#x6001;&#x4F2A;&#x7C7B;&#x9009;&#x62E9;&#x7B26; E:checked_CSS&#x53C2;&#x8003;&#x624B;&#x518C;_web&#x524D;&#x7AEF;&#x5F00;&#x53D1;&#x53C2;&#x8003;&#x624B;&#x518C;&#x7CFB;&#x5217;&lt;/title&gt;
&lt;meta name=&quot;author&quot; content=&quot;Joy Du(&#x98D8;&#x96F6;&#x96FE;&#x96E8;), dooyoe@gmail.com, www.doyoe.com&quot; /&gt;
&lt;style&gt;
input:checked + span {
    background: #f00;
}
input:checked + span:after {
    content: &quot; &#x6211;&#x88AB;&#x9009;&#x4E2D;&#x4E86;&quot;;
}
&lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;form method=&quot;post&quot; action=&quot;#&quot;&gt;
&lt;fieldset&gt;
    &lt;legend&gt;&#x9009;&#x4E2D;&#x4E0B;&#x9762;&#x7684;&#x9879;&#x8BD5;&#x8BD5;&lt;/legend&gt;
    &lt;ul&gt;
        &lt;li&gt;&lt;label&gt;&lt;input type=&quot;radio&quot; name=&quot;colour-group&quot; value=&quot;0&quot; /&gt;&lt;span&gt;&#x84DD;&#x8272;&lt;/span&gt;&lt;/label&gt;&lt;/li&gt;
        &lt;li&gt;&lt;label&gt;&lt;input type=&quot;radio&quot; name=&quot;colour-group&quot; value=&quot;1&quot; /&gt;&lt;span&gt;&#x7EA2;&#x8272;&lt;/span&gt;&lt;/label&gt;&lt;/li&gt;
        &lt;li&gt;&lt;label&gt;&lt;input type=&quot;radio&quot; name=&quot;colour-group&quot; value=&quot;2&quot; /&gt;&lt;span&gt;&#x9ED1;&#x8272;&lt;/span&gt;&lt;/label&gt;&lt;/li&gt;
    &lt;/ul&gt;
&lt;/fieldset&gt;
&lt;fieldset&gt;
    &lt;legend&gt;&#x9009;&#x4E2D;&#x4E0B;&#x9762;&#x7684;&#x9879;&#x8BD5;&#x8BD5;&lt;/legend&gt;
    &lt;ul&gt;
        &lt;li&gt;&lt;label&gt;&lt;input type=&quot;checkbox&quot; name=&quot;colour-group2&quot; value=&quot;0&quot; /&gt;&lt;span&gt;&#x84DD;&#x8272;&lt;/span&gt;&lt;/label&gt;&lt;/li&gt;
        &lt;li&gt;&lt;label&gt;&lt;input type=&quot;checkbox&quot; name=&quot;colour-group2&quot; value=&quot;1&quot; /&gt;&lt;span&gt;&#x7EA2;&#x8272;&lt;/span&gt;&lt;/label&gt;&lt;/li&gt;
        &lt;li&gt;&lt;label&gt;&lt;input type=&quot;checkbox&quot; name=&quot;colour-group2&quot; value=&quot;2&quot; /&gt;&lt;span&gt;&#x9ED1;&#x8272;&lt;/span&gt;&lt;/label&gt;&lt;/li&gt;
    &lt;/ul&gt;
&lt;/fieldset&gt;
&lt;/form&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>

                    
                    </section>
                
                
                </div>
            </div>
        </div>

        
        <a href="../CSSd/css.10.html" class="navigation navigation-prev " aria-label="Previous page: 伪类选择器"><i class="fa fa-angle-left"></i></a>
        
        
        <a href="../CSSd/css.12.html" class="navigation navigation-next " aria-label="Next page: 属性选择器"><i class="fa fa-angle-right"></i></a>
        
    </div>
</div>

        
<script src="../gitbook/app.js"></script>

    
    <script src="../gitbook/plugins/gitbook-plugin-search/lunr.min.js"></script>
    

    
    <script src="../gitbook/plugins/gitbook-plugin-search/search.js"></script>
    

    
    <script src="../gitbook/plugins/gitbook-plugin-sharing/buttons.js"></script>
    

    
    <script src="../gitbook/plugins/gitbook-plugin-fontsettings/buttons.js"></script>
    

    
    <script src="../gitbook/plugins/gitbook-plugin-livereload/plugin.js"></script>
    

<script>
require(["gitbook"], function(gitbook) {
    var config = {"highlight":{},"search":{"maxIndexSize":1000000},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"livereload":{}};
    gitbook.start(config);
});
</script>

        
    </body>
    
</html>
